home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 25
/
Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso
/
Aminet
/
util
/
conv
/
convtemp.lha
/
convtemp.doc
< prev
Wrap
Text File
|
1998-04-19
|
3KB
|
97 lines
Convtemp v1.0
Convtemp is a small program which converts temperatures between the Celsius
and Fahrenheit scales. All calculations are floating point, and the results
are displayed as floating point numbers.
Command-line arguments:
Convtemp takes two arguments; the value to be converted, and the number
of decimal places to display the result.
By default, convtemp takes a value in Celsius and converts it to
Fahrenheit. To convert from Fahrenheit to Celsius, enter the value with
an F (or f) - e.g. to convert 59 degrees Fahrenheit, use 59F.
Floating point numbers may also be given, convtemp will accept either a
period '.' or comma ',' as the decimal separator.
The default number of decimal places displayed is 4, but another amount
can be given as a second argument. Convtemp will accept a value from 0
to 12, inclusive. Any trailing zeros will be dropped, so the number of
places displayed may be less than that given.
NOTE that no rounding up is done when trimming the decimal places,
e.g. 23.514194 will be truncated to 23.5141 by default.
Examples:
> convtemp 17
62.6
> convtemp 55F
12.7777
> convtemp 35.54524547 6
95.981441
> convtemp -4,6F
-20,3333
> convtemp 50.18f 10
10.1
Limits:
Any number between +/- 999999999.999999999 may be entered (note that
values below -273.15C (-459.67F) aren't physically possible according to
current theories).
The number of decimal places entered should be limited to 9 - any more
will give incorrect results.
For numbers within about +/- 200, convtemp is absolutely accurate,
within the above limit, to 12 decimal places. As the number increases
(or decreases, respectively), the accuracy will degrade, due to rounding
errors.
Bugs:
None that I know of.
If you find any, please mail me at convtemp@b-field.demon.co.uk giving
as much detail as possible, including what machine, processor, OS
version etc you have.
Feel free to send any other suggestions/comments to that address as
well.
Copyright:
Copyright (C) 1998 David Bloomfield <dave@b-field.demon.co.uk>
This program is FREEWARE. It can be freely distributed anywhere, but
please keep this text with the program.
Disclaimer:
This software comes without ANY warranty, expressed or implied. The
author has taken every reasonable step to ensure the software is 100%
reliable, but will not be held responsible for any damage caused as a
result of using this software. You use this program at your own risk!